package org.thread.test05.syn.demo04;

/**
 * 死锁 - 多线程之间抱有对方需要的锁，彼此之间不释放（互斥）
 * @author CSY
 * @date 2025 - 03 - 13
 */
public class MainTest {
    public static void main(String[] args) {
        OneThread oneThread = new OneThread();

        TwoThread twoThread = new TwoThread();

        oneThread.start();
        System.out.println(oneThread.isAlive());
        try {
            oneThread.join();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        twoThread.start();
    }

}
